package appLoader.data {	
	
	public class PropertyTable extends HashTable {
		
		public function PropertyTable() {
			super();
		}
		
		public function getProperty(propertyName:*):* {
			return get(propertyName);
		}
		//
		public function getStringProperty(propertyName:*):String {
			return (get(propertyName) != null) ?  String(get(propertyName)) : null;
		}
		//
		public function getNumberProperty(propertyName:*):Number {
			return Number(get(propertyName));
		}
		//
		public function getIntProperty(propertyName:*):int {
			return int(get(propertyName));
		}
		//
		public function getUintProperty(propertyName:*):uint {
			return uint(get(propertyName));
		}
		//
		public function getBooleanProperty(propertyName:*):Boolean {
			var obj:* = get(propertyName);
			switch(obj) {
				case true:
				case "true":
				case "t":
				case "T":
				case 1:
				case "1":
					
					// bizarrices contra servers POG:
				case "s":
				case "sim":
				case "ok":
					return true;
					break;
				default :
					return false;
			}
		}
		//
		public function getArrayProperty(propertyName:*):Array {
			return get(propertyName) as Array;
		}
		//
		public function setProperty(key:*, value:Object):void {
			put(key, value);
		}
		
		//
		public function toString():String {
			var s:String = "[ PropertyTable ]";
			s += "total: " + super.length().toString() + "\n\n";
			s += "=== keys: " + super.getKeys().toString() + "\n\n";
			s += "=== values: " + super.getValues().toString() + "\n";
			return s;
		}
	}
}
